import request from '@/utils/request'

// 查询工装信息列表
export function listFrock(query) {
  return request({
    url: '/experiment/frock/list',
    method: 'get',
    params: query
  })
}

// 查询工装信息详细
export function getFrock(frockId) {
  return request({
    url: '/experiment/frock/' + frockId,
    method: 'get'
  })
}

// 新增工装信息
export function addFrock(data) {
  return request({
    url: '/experiment/frock',
    method: 'post',
    data: data
  })
}

// 修改工装信息
export function updateFrock(data) {
  return request({
    url: '/experiment/frock',
    method: 'put',
    data: data
  })
}

// 删除工装信息
export function delFrock(frockId) {
  return request({
    url: '/experiment/frock/' + frockId,
    method: 'delete'
  })
}

// 导出工装信息
export function exportFrock(query) {
  return request({
    url: '/experiment/frock/export',
    method: 'get',
    params: query
  })
}
// 下载导入模板
export function importTemplate() {
  return request({
    url: '/experiment/frock/importTemplate',
    method: 'get'
  })
}

// 修改状态信息
export function changeState(equipmentId,state) {
  var data = {
    "ids" : equipmentId,
    "state" : state
  }
  return request({
    url: '/experiment/frock/changeState',
    method: 'post',
    data: data
  })
}

// 新增维修信息
export function addRepair(data) {
  return request({
    url: '/experiment/repair',
    method: 'post',
    data: data
  })
}

// 查询维修信息列表
export function listRepair(query) {
  return request({
    url: '/experiment/repair/repairList',
    method: 'get',
    params: query
  })
}
